package cn.jc.springframework.aop;

import org.aopalliance.intercept.MethodInterceptor;

/**
 * 用于把代理、拦截、匹配的各项属性包装到一个类中，便在 Proxy 实现类进行使用
 *
 * @Description:
 * @author: JC
 * @date: 2023/4/8 23:38
 */
public class AdvisedSupport {

    // 被代理目标的对象
    private TargetSource targetSource;
    // 方法拦截器
    private MethodInterceptor methodInterceptor;
    // 方法匹配器(检查方法是否配置)
    private MethodMatcher methodMatcher;

    // ProxyConfig
    private boolean proxyTargetClass = false;

    public boolean isProxyTargetClass() {
        return proxyTargetClass;
    }
    public TargetSource getTargetSource() {
        return targetSource;
    }


    public void setProxyTargetClass(boolean proxyTargetClass) {
        this.proxyTargetClass = proxyTargetClass;
    }



    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {
        this.methodInterceptor = methodInterceptor;
    }

    public MethodMatcher getMethodMatcher() {
        return methodMatcher;
    }

    public void setMethodMatcher(MethodMatcher methodMatcher) {
        this.methodMatcher = methodMatcher;
    }
}
